<div id="layout_main_top">

</div>
<div id="layout_main">

{if !isset($errormessage)}

<DIV class="MenuHead">
Step 1
</DIV>

<DIV class="MenuText">
Please select all the raid members that participated in the raid.<br />Only players that are on the main list below will be awarded RP.<br><br>
Press on Update to update the list with participation. <br> When you are finished and the list is complete press 'Next Step '.
</DIV>

<br />
<form name="manualrp" ACTION="index.php?page=manual&amp;action=manual&amp;raid={$selected_raid}" method="POST">
<input type="hidden" name="main_id_list" value="{$main_id_list}">
<input type="hidden" name="subaction" value="update_list">
<input type="hidden" name="step" value="{$step}">


<DIV class="MenuText">
<input type="submit" name="submit" value="Next Step">
</DIV>

<table id="main_table" cellspacing='0' >
<tr class="menu_header">
	<th>#</th>
	<th>
			Class
	</th>
	<th class="left">
			Name
	</th>
	<th>
        Options
	</th>
</tr>
<tr class="menu_header">
	<td colspan='3'>
	</td>
	<td>
        <input type="image" src="./images/buttons/delete.gif" alt="" name="submit" value="delete"  style="border: 0px; background: none;" />
	</td>
</tr>
{foreach name=mains item=character from=$mains}

<tr class="{if $character.user_id eq $user_id}row_3{else}{cycle values="row_1,row_2"}{/if}">
	<td>{$smarty.foreach.mains.iteration}</td>
	<td><img src="./images/classes/{$character.class}.gif" alt="" width="20" height="20" />
	</td>
	<td class="left">{$character.name}</td>
	<td>
	    <input type="hidden" name="Main[]" value="{$character.player_id}">
        <input type="checkbox" name="CheckMain{$character.player_id}">
	</td>
</tr>

{foreachelse}
<tr class="{cycle values="row_1,row_2"}">
	<td colspan=12>No characters could be found.</td>
</tr>

{/foreach}

<tr class="menu_header">
	<td colspan=12>Add Player</td>
</tr>

<tr class="menu_header">
	<td colspan=12>

        search: <INPUT NAME=regexp onKeyUp="myfilter.set(this.value)">

        <select name="players" class="large" style="width: 125px;">

        {foreach name=players item=player from=$players}

        <option value="{$player.player_id}">{$player.name}

        {foreachelse}
            <option value=0>No players found</option>
        {/foreach}
        </select>
	</td>
</tr>

        <SCRIPT TYPE="text/javascript">
        <!--
        var myfilter = new filterlist(document.manualrp.players);
        //-->
        </SCRIPT>

<tr class="menu_header">
	<td colspan=12><input type="submit" name="submit" value="Add Player"></td>
</tr>

<tr class="menu_header">
	<td colspan=12><br /></td>
</tr>



</form>
<tr class="menu_footer">
	<td colspan=12></td>
</tr>

</table>


{else}


<DIV class="MenuHead">
Succesfull!
</DIV>

<DIV class="MenuText">
{$message}
</DIV>




{/if}

</div>
<div id="layout_main_bottom">

</div>